package pattern.factory.demo1;

/**
 * 执行类
 */
public class Exec {

    public static void main(String[] args) {

        ShapeFactory shapeFactory = new ShapeFactory();

        //画圆
        Shape shape = shapeFactory.getShape("CIRCLE");
        shape.draw();

        //画长方形
        Shape shape1 = shapeFactory.getShape("RECTANGLE");
        shape1.draw();

        //画正方形
        Shape shape2 = shapeFactory.getShape("SQUARE");
        shape2.draw();

    }
}
